package de.zainodis.kitchengnome.ui;

import de.zainodis.commons.utils.StringUtils;
import android.widget.TextView;

public class UiUtils {

	private UiUtils() {
		// Utility class
	}

	/**
	 * Clears the text of the given {@link TextView}.
	 * 
	 * @param toClear
	 *           the textview whose content should be cleared.
	 */
	public static void clearTextView(TextView toClear) {
		if (toClear != null) {
			// Clear the textview
			toClear.setText(StringUtils.EMPTY);
			toClear.postInvalidate();
		}
	}
}
